import malou.car.factory.Factory;
import malou.car.factory.Car;

import java.util.ArrayList;
import java.util.List;

public class Main {
    public static void main(String[] args){
        List<Car> carList = new ArrayList<>();
        carList.add(Factory.getCarInstanceByType("齐天"));
        carList.add(Factory.getCarInstanceByType("通天"));
        carList.add(Factory.getCarInstanceByType("平天"));
        carList.add(Factory.getCarInstanceByType("齐天"));

        for (Car currentCar : carList){
            System.out.println(currentCar.showName());
        }
    }
}
